[FFmpeg-devel] [PATCH] av_find_best_stream

Nicolas George nicolas.george
Fri Dec 24 18:59:08 CET 2010

Le tridi 3 niv?se, an CCXIX, Michael Niedermayer a ?crit?:
> This API doesnt work because we want streams from the same program not a video
> stream from one channel and a audio stream from another.

Right, I did not think of that.

I added a parameter, related_stream: if it is >= 0, the function will try to
select from the same program. The typical use case, which I implemented in
ffplay, would be:

	video_stream = av_find_best_stream(..., -1, ...);
	audio_stream = av_find_best_stream(..., video_stream, ...);
	sub_strea?   = av_find_best_stream(..., audio_stream, ...);

This makes the code slightly more complex than it was before, since ffplay
did not do that.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-findstream-20101224-1855-01-findstream.diff
Type: text/x-diff
Size: 7996 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101224/a22cf606/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101224/a22cf606/attachment.pgp>

More information about the ffmpeg-devel mailing list