diff mbox

[FFmpeg-devel,1/2] Revert "ffserver: use AVStream.codecpar in open_input_stream()"

Message ID 20161123191305.5703-1-michael@niedermayer.cc
State Accepted
Commit bc9eb0467a52828d6be48de5e60f042bf3b62d1f
Headers show

Commit Message

Michael Niedermayer Nov. 23, 2016, 7:13 p.m. UTC
Fixes null pointer dereference

Testcase is simply a ffmpeg instance sending a stream to ffserver while another ffmpeg reads from it

This reverts commit 6f0a1710d77dde0d803861506a2157a23f08c14c.
---
 ffserver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Nov. 27, 2016, 1:18 p.m. UTC | #1
On Wed, Nov 23, 2016 at 08:13:04PM +0100, Michael Niedermayer wrote:
> Fixes null pointer dereference
> 
> Testcase is simply a ffmpeg instance sending a stream to ffserver while another ffmpeg reads from it
> 
> This reverts commit 6f0a1710d77dde0d803861506a2157a23f08c14c.
> ---
>  ffserver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

patchset applied

[...]
diff mbox

Patch

diff --git a/ffserver.c b/ffserver.c
index 3007e2d..01f311d 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2213,7 +2213,7 @@  static int open_input_stream(HTTPContext *c, const char *info)
     c->pts_stream_index = 0;
     for(i=0;i<c->stream->nb_streams;i++) {
         if (c->pts_stream_index == 0 &&
-            c->stream->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
+            c->stream->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             c->pts_stream_index = i;
         }
     }