When setting codec_id during codec probe we must also set codec_type.
Originally committed as revision 14966 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		@@ -352,14 +352,19 @@ static int set_codec_from_probe_data(AVStream *st, AVProbeData *pd, int score)
 | 
				
			|||||||
    fmt = av_probe_input_format2(pd, 1, &score);
 | 
					    fmt = av_probe_input_format2(pd, 1, &score);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (fmt) {
 | 
					    if (fmt) {
 | 
				
			||||||
        if (!strcmp(fmt->name, "mp3"))
 | 
					        if (!strcmp(fmt->name, "mp3")) {
 | 
				
			||||||
            st->codec->codec_id = CODEC_ID_MP3;
 | 
					            st->codec->codec_id = CODEC_ID_MP3;
 | 
				
			||||||
        else if (!strcmp(fmt->name, "ac3"))
 | 
					            st->codec->codec_type = CODEC_TYPE_AUDIO;
 | 
				
			||||||
 | 
					        } else if (!strcmp(fmt->name, "ac3")) {
 | 
				
			||||||
            st->codec->codec_id = CODEC_ID_AC3;
 | 
					            st->codec->codec_id = CODEC_ID_AC3;
 | 
				
			||||||
        else if (!strcmp(fmt->name, "mpegvideo"))
 | 
					            st->codec->codec_type = CODEC_TYPE_AUDIO;
 | 
				
			||||||
 | 
					        } else if (!strcmp(fmt->name, "mpegvideo")) {
 | 
				
			||||||
            st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
 | 
					            st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
 | 
				
			||||||
        else if (!strcmp(fmt->name, "h264"))
 | 
					            st->codec->codec_type = CODEC_TYPE_VIDEO;
 | 
				
			||||||
 | 
					        } else if (!strcmp(fmt->name, "h264")) {
 | 
				
			||||||
            st->codec->codec_id = CODEC_ID_H264;
 | 
					            st->codec->codec_id = CODEC_ID_H264;
 | 
				
			||||||
 | 
					            st->codec->codec_type = CODEC_TYPE_VIDEO;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return !!fmt;
 | 
					    return !!fmt;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user