[FFmpeg-devel] [PATCH] lavf: allow av_find_best_stream to return AV_DISPOSITION_*_IMPAIRED wanted_streams
Michael Niedermayer
michaelni at gmx.at
Wed Feb 5 16:04:46 CET 2014
On Tue, Feb 04, 2014 at 11:59:47PM +0100, Marton Balint wrote:
> Previously these type of streams were not returned even if wanted stream was
> set to a stream of such. Now they are only skipped if they are not wanted
> streams.
>
> Fixes ffplay -sst <stream number> out.ts where stream number is a *_IMPAIRED stream.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavformat/utils.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 2be4279..5cb7561 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -3373,7 +3373,8 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type,
> continue;
> if (wanted_stream_nb >= 0 && real_stream_index != wanted_stream_nb)
> continue;
> - if (st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED |
> + if (wanted_stream_nb != real_stream_index &&
> + st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED |
> AV_DISPOSITION_VISUAL_IMPAIRED))
> continue;
i think this should rather search for a stream with similar
AV_DISPOSITION*IMPAIRED in relation to the reference stream
than just pick the reference as a special case
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140205/67efa4fd/attachment.asc>
More information about the ffmpeg-devel
mailing list