This is not a bugfix in code but coverity only, it does look a little nicer though Fixes: CID732224
Unified · Split
| @@ -91,7 +91,6 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) · 90 unmodified lines | |||
| 91 | frame_type = avio_rb16(pb); | 91 | frame_type = avio_rb16(pb); |
| 92 | packet_size = avio_rb32(pb); | 92 | packet_size = avio_rb32(pb); |
| 93 | padding = -packet_size & 511; | 93 | padding = -packet_size & 511; |
| 94 | frame_size = packet_size - 8; | ||
| 95 | 94 | ||
| 96 | if (frame_type > LMLM4_MPEG1L2 || frame_type == LMLM4_INVALID) { | 95 | if (frame_type > LMLM4_MPEG1L2 || frame_type == LMLM4_INVALID) { |
| 97 | av_log(s, AV_LOG_ERROR, "invalid or unsupported frame_type\n"); | 96 | av_log(s, AV_LOG_ERROR, "invalid or unsupported frame_type\n"); |
| @@ -102,6 +101,7 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) · 4 unmodified lines | |||
| 102 | return AVERROR(EIO); | 101 | return AVERROR(EIO); |
| 103 | } | 102 | } |
| 104 | 103 | ||
| 104 | frame_size = packet_size - 8; | ||
| 105 | if ((ret = av_get_packet(pb, pkt, frame_size)) <= 0) | 105 | if ((ret = av_get_packet(pb, pkt, frame_size)) <= 0) |
| 106 | return AVERROR(EIO); | 106 | return AVERROR(EIO); |
| 107 | 107 | ||