Unified · Split
| @@ -828,8 +828,6 @@ end: · 827 unmodified lines | |||
| 828 | return ret; | 828 | return ret; |
| 829 | } | 829 | } |
| 830 | 830 | ||
| 831 | #define FAIL(r) do { ret = r; goto fail; } while (0) | ||
| 832 | |||
| 833 | static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt) | 831 | static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt) |
| 834 | { | 832 | { |
| 835 | MpegDemuxContext *vobsub = s->priv_data; | 833 | MpegDemuxContext *vobsub = s->priv_data; |
| @@ -878,7 +876,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt) · 42 unmodified lines | |||
| 878 | if (ret < 0) { | 876 | if (ret < 0) { |
| 879 | if (pkt->size) // raise packet even if incomplete | 877 | if (pkt->size) // raise packet even if incomplete |
| 880 | break; | 878 | break; |
| 881 | FAIL(ret); | 879 | goto fail; |
| 882 | } | 880 | } |
| 883 | to_read = ret & 0xffff; | 881 | to_read = ret & 0xffff; |
| 884 | new_pos = avio_tell(pb); | 882 | new_pos = avio_tell(pb); |
| @@ -895,7 +893,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt) · 10 unmodified lines | |||
| 895 | 893 | ||
| 896 | ret = av_grow_packet(pkt, to_read); | 894 | ret = av_grow_packet(pkt, to_read); |
| 897 | if (ret < 0) | 895 | if (ret < 0) |
| 898 | FAIL(ret); | 896 | goto fail; |
| 899 | 897 | ||
| 900 | n = avio_read(pb, pkt->data + (pkt->size - to_read), to_read); | 898 | n = avio_read(pb, pkt->data + (pkt->size - to_read), to_read); |
| 901 | if (n < to_read) | 899 | if (n < to_read) |