On Fri, Jun 12, 2015 at 12:38:19PM +0200, Wolfgang Lorenz wrote: > Am Fri, 12 Jun 2015 00:12:37 +0200 > schrieb Wolfgang Lorenz <wl-c...@gmx.de>: > > > Am Thu, 11 Jun 2015 23:11:37 +0200 > > schrieb Michael Niedermayer <michae...@gmx.at>: > > > > > On Thu, Jun 11, 2015 at 10:59:23PM +0200, Wolfgang Lorenz wrote: > > > > Hi Micheal, > > > > > > > > Am Wed, 10 Jun 2015 23:40:10 +0200 > > > > schrieb Michael Niedermayer <michae...@gmx.at>: > > > > > > > > > Based on patch by Wolfgang Lorenz <wl-c...@gmx.de> > > > > > Signed-off-by: Michael Niedermayer <michae...@gmx.at> > > > > > --- > > > > > libavformat/mpegts.c | 7 +++++++ > > > > > 1 file changed, 7 insertions(+) > > > > > > > > > > diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c > > > > > index eff6819..7b35d7f 100644 > > > > > --- a/libavformat/mpegts.c > > > > > +++ b/libavformat/mpegts.c > > > > > @@ -835,6 +835,13 @@ static int mpegts_set_stream_info(AVStream *st, > > > > > PESContext *pes, > > > > > st->codec->codec_id = old_codec_id; > > > > > st->codec->codec_type = old_codec_type; > > > > > } > > > > > + if ((st->codec->codec_id == AV_CODEC_ID_NONE || > > > > > st->request_probe == 1) && > > > > > + !avcodec_is_open(st->codec) && > > > > > + stream_type == 6) { > > > > > + st->codec->codec_type = AVMEDIA_TYPE_DATA; > > > > > + st->codec->codec_id = AV_CODEC_ID_BIN_DATA; > > > > > + st->request_probe = 1; > > > > > + } > > > > > > > > > > return 0; > > > > > } > > > > > > > > First things first: It's breaking fate-acodec-s302m for me. > > > > > > make sure you use latest git master of ffmpeg, there was a commit > > > rather recently that is needed > > > > Sorry, I had missed that. fate-acodec-s302m is passing now. I haven't > > waited until all tests finished, but I think it will be all right. > > > > > if that doesnt work with your file then please provide that file > > > > > > > > > [...] > > > > If in your patch the request_probe value is set to a higher value, like > > > > e.g. 10, avformat_find_stream_info() behaves nicely and I do not need > > > > to reset the value manually. fate-acodec-s302m is still broken, though. > > > > > > yes, the value will need finetuning, whats the more or less lowest > > > that results in 100% reliable detection ? > > > > My test case is already happy with a value as low as 2. I can not test > > much more right now, though. I don't really feel good, with having such > > a low threshold. Maybe the number could be made configurable? (I always > > like configurable ;-) ). > > Okay, I think it doesn't make much sense, to make this threshold > configurable. On the other hand, I'm not a friend of just blindly > choosing some number, that coincidently passes all tests. I like > choosing numbers, that come with a reason. So, how about assigning > AVPROBE_SCORE_STREAM_RETRY? The number is already predefined. Any > codec beating this threshold with a higher score is considered to have > a strong enough probing value, to automatically disable any further > probing. Aaand it coincidently passes all tests.
applied patch with some increased threshold, using AVPROBE_SCORE_STREAM_RETRY as is would break detection of any format "asking" fo retrying so a lower value is better if it works [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel