This fixes crashes when called from rtpdec_qt, where
AVFormatContext->pb is null, a crash present since 3bab7cd128.
Signed-off-by: Martin Storsjö <martin@martin.st>
... | ... |
@@ -543,9 +543,9 @@ uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, |
543 | 543 |
return tag; |
544 | 544 |
} |
545 | 545 |
|
546 |
-int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size) |
|
546 |
+int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, |
|
547 |
+ int64_t size) |
|
547 | 548 |
{ |
548 |
- AVIOContext *pb = s->pb; |
|
549 | 549 |
uint32_t layout_tag, bitmap, num_descr, label_mask; |
550 | 550 |
int i; |
551 | 551 |
|
... | ... |
@@ -57,10 +57,12 @@ uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, |
57 | 57 |
* Read 'chan' tag from the input stream. |
58 | 58 |
* |
59 | 59 |
* @param s AVFormatContext |
60 |
+ * @param pb AVIOContext |
|
60 | 61 |
* @param st The stream to set codec values for |
61 | 62 |
* @param size Remaining size in the 'chan' tag |
62 | 63 |
* @return 0 if ok, or negative AVERROR code on failure |
63 | 64 |
*/ |
64 |
-int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size); |
|
65 |
+int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, |
|
66 |
+ int64_t size); |
|
65 | 67 |
|
66 | 68 |
#endif /* AVFORMAT_MOV_CHAN_H */ |