mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-19 13:50:58 +00:00
ffserver: set the sample aspect ratio
Hi.
It seems that ffserver sets sample_aspect_ratio to an invalid value and lavf
rejects it.
I am not sure what I am doing here, but the attached patch actually solves
something: using the following config:
CustomLog -
NoDaemon
RTSPPort 5454
<Stream test1-rtsp.mpg>
Format rtp
File "/tmp/test1-rtsp.mpg"
</Stream>
it allows a somewhat old ffplay (unaffected by the content-base issue I
spoke of in another thread) to play the stream.
Without it, ffserver logs this and closes the stream:
Wed Feb 16 14:52:14 2011 [rtp @ 0x1399de0]Aspect ratio mismatch between encoder and muxer layer
Regards,
--
Nicolas George
From 1b89c3c2164335060e87567b27deb0d354e0a814 Mon Sep 17 00:00:00 2001
From: Nicolas George <nicolas.george@normalesup.org>
Date: Wed, 16 Feb 2011 14:44:31 +0100
Subject: [PATCH] ffserver: set the sample aspect ratio.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
(cherry picked from commit 6741f7c9be
)
This commit is contained in:
parent
728d56e84f
commit
34c340d49f
@ -3487,7 +3487,7 @@ static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int cop
|
|||||||
fst->priv_data = av_mallocz(sizeof(FeedData));
|
fst->priv_data = av_mallocz(sizeof(FeedData));
|
||||||
fst->index = stream->nb_streams;
|
fst->index = stream->nb_streams;
|
||||||
av_set_pts_info(fst, 33, 1, 90000);
|
av_set_pts_info(fst, 33, 1, 90000);
|
||||||
fst->sample_aspect_ratio = (AVRational){0,1};
|
fst->sample_aspect_ratio = codec->sample_aspect_ratio;
|
||||||
stream->streams[stream->nb_streams++] = fst;
|
stream->streams[stream->nb_streams++] = fst;
|
||||||
return fst;
|
return fst;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user