summaryrefslogtreecommitdiff
path: root/libavformat/rtmppkt.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-25 00:38:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-25 00:38:16 +0200
commit65e63072f81641f50e5775be5c3b2873e8d6f38e (patch)
tree766617aff5fadbb6bee949ee7669c9431d00a374 /libavformat/rtmppkt.c
parentba4aa656ce1c4e530bec4ed1b0fcf67eb20283f0 (diff)
parenta4d3f3580bd993f4e8f4abc9c4ad486cb1c51987 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: rtmp: Return a proper error code instead of -1 rtmp: Check malloc calls rtmp: Check ff_rtmp_packet_create calls lavfi: add audio mix filter flvdec: Make sure sample_rate is set to the updated value tqi: Pass errors from the MB decoder Conflicts: Changelog doc/filters.texi libavcodec/eatqi.c libavfilter/Makefile libavfilter/allfilters.c libavfilter/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmppkt.c')
-rw-r--r--libavformat/rtmppkt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c
index 61e159b06a..bca4a9dab6 100644
--- a/libavformat/rtmppkt.c
+++ b/libavformat/rtmppkt.c
@@ -79,6 +79,7 @@ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p,
uint32_t extra = 0;
enum RTMPPacketType type;
int size = 0;
+ int ret;
if (ffurl_read(h, &hdr, 1) != 1)
return AVERROR(EIO);
@@ -129,8 +130,9 @@ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p,
if (hdr != RTMP_PS_TWELVEBYTES)
timestamp += prev_pkt[channel_id].timestamp;
- if (ff_rtmp_packet_create(p, channel_id, type, timestamp, data_size))
- return -1;
+ if ((ret = ff_rtmp_packet_create(p, channel_id, type, timestamp,
+ data_size)) < 0)
+ return ret;
p->extra = extra;
// save history
prev_pkt[channel_id].channel_id = channel_id;