Reverted at the request of the Author due to potential regression with SMPTE 2110-20 This reverts commit 9051092e73666e95986eb2d596cc0867aea05c3d.
Unified · Split
| @@ -205,11 +205,8 @@ static int rfc4175_handle_packet(AVFormatContext *ctx, PayloadContext *data, · 204 unmodified lines | |||
| 205 | if (length > payload_len) | 205 | if (length > payload_len) |
| 206 | length = payload_len; | 206 | length = payload_len; |
| 207 | 207 | ||
| 208 | if (line < 1) | ||
| 209 | return AVERROR_INVALIDDATA; | ||
| 210 | |||
| 211 | /* prevent ill-formed packets to write after buffer's end */ | 208 | /* prevent ill-formed packets to write after buffer's end */ |
| 212 | copy_offset = ((line - 1) * data->width + offset) * data->pgroup / data->xinc; | 209 | copy_offset = (line * data->width + offset) * data->pgroup / data->xinc; |
| 213 | if (copy_offset + length > data->frame_size) | 210 | if (copy_offset + length > data->frame_size) |
| 214 | return AVERROR_INVALIDDATA; | 211 | return AVERROR_INVALIDDATA; |
| 215 | 212 | ||