Unified · Split
| @@ -823,7 +823,7 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code) · 822 unmodified lines | |||
| 823 | { | 823 | { |
| 824 | AVFormatContext *s = nut->avf; | 824 | AVFormatContext *s = nut->avf; |
| 825 | AVIOContext *bc = s->pb; | 825 | AVIOContext *bc = s->pb; |
| 826 | int size, stream_id, discard; | 826 | int size, stream_id, discard, ret; |
| 827 | int64_t pts, last_IP_pts; | 827 | int64_t pts, last_IP_pts; |
| 828 | StreamContext *stc; | 828 | StreamContext *stc; |
| 829 | uint8_t header_idx; | 829 | uint8_t header_idx; |
| @@ -848,7 +848,9 @@ static int decode_frame(NUTContext *nut, AVPacket *pkt, int frame_code) · 18 unmodified lines | |||
| 848 | return 1; | 848 | return 1; |
| 849 | } | 849 | } |
| 850 | 850 | ||
| 851 | av_new_packet(pkt, size + nut->header_len[header_idx]); | 851 | ret = av_new_packet(pkt, size + nut->header_len[header_idx]); |
| 852 | if (ret < 0) | ||
| 853 | return ret; | ||
| 852 | memcpy(pkt->data, nut->header[header_idx], nut->header_len[header_idx]); | 854 | memcpy(pkt->data, nut->header[header_idx], nut->header_len[header_idx]); |
| 853 | pkt->pos = avio_tell(bc); // FIXME | 855 | pkt->pos = avio_tell(bc); // FIXME |
| 854 | avio_read(bc, pkt->data + nut->header_len[header_idx], size); | 856 | avio_read(bc, pkt->data + nut->header_len[header_idx], size); |