History

avformat/amvenc: Remove unnecessary av_packet_free()

The muxer's deinit function takes care of cleaning up when init fails.

Andreas Rheinhardt committed 5 years ago

Commit dfad5791 parent 3903c131 file · +0 −2Browse files

Unified · Split

libavformat/amvenc.c+0−2
@@ -187,7 +187,6 @@ static av_cold int amv_init(AVFormatContext *s) · 186 unmodified lines
187 if (!amv->apad)187 if (!amv->apad)
188 return AVERROR(ENOMEM);188 return AVERROR(ENOMEM);
189 if ((ret = av_new_packet(amv->apad, amv->ablock_align)) < 0) {189 if ((ret = av_new_packet(amv->apad, amv->ablock_align)) < 0) {
190 av_packet_free(&amv->apad);
191 return ret;190 return ret;
192 }191 }
193 192
@@ -197,7 +196,6 @@ static av_cold int amv_init(AVFormatContext *s) · 3 unmodified lines
197 196
198 amv->vpad = av_packet_alloc();197 amv->vpad = av_packet_alloc();
199 if (!amv->vpad) {198 if (!amv->vpad) {
200 av_packet_free(&amv->apad);
201 return AVERROR(ENOMEM);199 return AVERROR(ENOMEM);
202 }200 }
203 amv->vpad->stream_index = AMV_STREAM_VIDEO;201 amv->vpad->stream_index = AMV_STREAM_VIDEO;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t