Revision 2a81f4bd libavcodec/utils.c

View differences:

libavcodec/utils.c
871 871
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
872 872
{
873 873
    const char *codec_name;
874
    const char *profile = NULL;
874 875
    AVCodec *p;
875 876
    char buf1[32];
876 877
    int bitrate;
......
883 884

  
884 885
    if (p) {
885 886
        codec_name = p->name;
887
        profile = av_get_profile_name(p, enc->profile);
886 888
    } else if (enc->codec_id == CODEC_ID_MPEG2TS) {
887 889
        /* fake mpeg2 transport stream codec (currently not
888 890
           registered) */
......
902 904
        snprintf(buf, buf_size,
903 905
                 "Video: %s%s",
904 906
                 codec_name, enc->mb_decision ? " (hq)" : "");
907
        if (profile)
908
            snprintf(buf + strlen(buf), buf_size - strlen(buf),
909
                     " (%s)", profile);
905 910
        if (enc->pix_fmt != PIX_FMT_NONE) {
906 911
            snprintf(buf + strlen(buf), buf_size - strlen(buf),
907 912
                     ", %s",
......
937 942
        snprintf(buf, buf_size,
938 943
                 "Audio: %s",
939 944
                 codec_name);
945
        if (profile)
946
            snprintf(buf + strlen(buf), buf_size - strlen(buf),
947
                     " (%s)", profile);
940 948
        if (enc->sample_rate) {
941 949
            snprintf(buf + strlen(buf), buf_size - strlen(buf),
942 950
                     ", %d Hz", enc->sample_rate);

Also available in: Unified diff